#!/bin/bash

DATE=$(date "+%F %T")
tar -czf $DATE.log.tar.gz /var/log
find  /bak/*.log.tar.gz -type f -mtime +7 -exec rm -rf {} \;
